#include <iostream>
#include <fstream>
#include <vector>
#include <string>

void readFileIntoVector(const std::string& filename, std::vector<std::string>& lines) {
    std::ifstream file(filename);
    if (!file.is_open()) {
        std::cerr << "Could not open the file " << filename << std::endl;
        return;
    }

    std::string line;
    while (std::getline(file, line)) {
        lines.push_back(line);
    }

    file.close();
}

int main() {
    std::string filename = "example.txt"; 
    std::vector<std::string> lines;

    readFileIntoVector(filename, lines);

    for (const auto& line : lines) {
        std::cout << line << std::endl;
    }

    return 0;
}
